package x.zero.component;

import org.springframework.beans.factory.annotation.Value;
import x.zero.vo.OssAliyunField;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 阿里云配置类
 *
 */
@Configuration
public class OssAliyunConfig {

    @Bean(value = "defaultOssAliyunField")
//    @ConfigurationProperties(prefix="oss.aliyun.defalut")
    @Value("${oss.aliyun.defalut}")
    public OssAliyunField defaultOssAliyunField() {
        return new OssAliyunField();
    }

    @Bean(value = "firstOssAliyuField")
//    @ConfigurationProperties("oss.aliyun.first")
    @Value("${oss.aliyun.first}")
    public OssAliyunField firstOssAliyuField() {
        return new OssAliyunField();
    }

    @Bean(value = "secondOssAliyuField")
//    @ConfigurationProperties("oss.aliyun.second")
    @Value("${oss.aliyun.second}")
    public OssAliyunField secondOssAliyuField() {
        return new OssAliyunField();
    }
}
